import 'package:FlutterRoute/common/models/LoginUser.dart';
import 'package:flutter/material.dart' show BuildContext;
import 'package:provider/provider.dart';

class Store{

  static BuildContext context;
  static BuildContext widgetCtx;

  static init({context,child}){
    return MultiProvider(providers: [
      ChangeNotifierProvider(create: (_)=> LoginUserProvider())
    ],
      child: child,
    );
  }

  static T of<T>(context,{bool listen = true}){
    return Provider.of(context,listen: listen);
  }

  static Consumer consumer<T>({builder,child}){
    return Consumer<T>(builder: builder,child: child,);
  }
}